package _interface.Exer2;

public class InterfaceTest {
    public static void main(String[] args) {
        ComparableCircle circle1 = new ComparableCircle();
        ComparableCircle circle2 = new ComparableCircle();
        circle1.setRadius(10);
        circle2.setRadius(12);
        int compareValue = circle1.compareTo(circle2);
        if (compareValue == 0)
            System.out.println("相等");
        else if (compareValue > 0) {
            System.out.println("circle1半径大");
        } else
            System.out.println("circle2半径大");
    }
}
